package com.baoidea.data.service;

import com.baoidea.grid.Grid2;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class NewTableHistory extends SQLiteOpenHelper {

	private static final int VERSION = 1;
	private Context context = null;

	public NewTableHistory(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		this.context = context;
	}

	public NewTableHistory(Context context, String name) {
		super(context, name, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		String sql = "create table post(id int,name varchar(20),pinyin varchar(20),"
				+ "ph800 varchar(10),ph400 varchar(10),phtel varchar(10),phperson varchar(15),phmaster varchar(15),url varchar(50),com varchar(30))";

		// db.execSQL("create table user(id int,name varchar(20))");
		System.out.println(sql);
		db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}
	
	
}
